{% extends 'share_layout/base.html' %}
{% load static %}
{% block head %}
    <link rel="stylesheet" type="text/css" href="{% static 'css/login.css' %}" />
{% endblock %}
{% block content %}
    <div class="container">
        <div class="row justify-content-center" style="height: 100vh">
            <div class="col-4 align-self-center">
                <form method="post">
                    {% csrf_token %}
                    <em class="error">{{ form.non_field_errors }}</em>
                    <div class="form-group {% if form.username.errors %}error{% endif %}">
                        {{ form.username }}
                        <em class="error" id="usernameError">
                            {{ form.username.errors }}
                        </em>
                    </div>
                    <div class="form-group {% if form.password.errors %}error{% endif %}">
                        {{ form.password }}
                        <em class="error" id="passwordError">
                            {{ form.password.errors }}
                        </em>
                    </div>
                    <div class="form-group text-center">
                        <button type="submit"  class="btn btn-primary w-50">登录</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
{% endblock %}